home *** CD-ROM | disk | FTP | other *** search
- Path: daily-planet.execpc.com!usenet
- From: maniac@execpc.com (Paul Voight)
- Newsgroups: comp.lang.c
- Subject: Re: 256 colors in BCG
- Date: 2 Feb 1996 02:13:15 GMT
- Organization: Exec-PC Internet
- Message-ID: <4errvr$f0o@daily-planet.execpc.com>
- References: <4enojq$4j@badger.wmin.ac.uk>
- NNTP-Posting-Host: eddie.execpc.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- In article <4enojq$4j@badger.wmin.ac.uk>, kruppd@westminster.ac.uk says...
- >
- >I am using a borland compiler and want to write images to the screen
- >with 256 grey levels or alternatively 256 graded in a recognisable way
- >eg. rainbow. I know that in mode 13h I have acess to 256 colors
- >but at a lower resolution then vga. Also accessing mode 13h means
- >writing some assembly code. Is there a library on the net which will
- >give me 256 grey levels that can be called from a standard c programme.
- >thanks
- >Declan Kruppa
- >
-
- Use this function I wrote using in line asm.
-
- void setmode(int mode)
- {
- asm{
- mov AH, 0
- mov AL, BYTE PTR mode
- int 10h
- }
- }
-
- use 13h for 320x200 256 color
- use 03h for text again
-
- setmode(0x13); /* 320x200 */
- setmode(0x03); /* Text mode */
-
- hope this helps
-
-